﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace OlivingRegisterTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.Text = OlivingRegister.Register.ReadMachineCode();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            textBox2.Text = OlivingRegisterGeneration.RegisterGeneration.GetRegisterCode(textBox1.Text.Trim(), dateTimePicker1.Value);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            DateTime dt = DateTime.MinValue;
            OlivingRegister.Register.VerifyRegisterCode(textBox1.Text.Trim(), textBox3.Text.Trim(), out dt);

            MessageBox.Show(dt.ToString());
        }

    }
}
